from PIL import Image
import requests
import os
import time

requestVerifyCodeUrl = "https://mall.jd.com/sys/vc/createVerifyCode.html"
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36'}
path = "D:\\PythonProject\\vc_recognition_test\\vc_base1\\"

for i in range(14):
    time.sleep(0.9)
    req = requests.get(requestVerifyCodeUrl,headers=headers)
    f = open(path+str(i)+".jpg", 'wb')
    f.write(req.content)
    f.close()
